package crmdna.list;

import javax.inject.Named;

import com.google.api.server.spi.config.Api;
import com.google.api.server.spi.config.ApiMethod;
import com.google.api.server.spi.config.ApiMethod.HttpMethod;

import crmdna.common.APIResponse;
import crmdna.common.APIResponse.Status;

@Api(name = "list")
public class ListApi {

	@ApiMethod(path = "addMember", httpMethod = HttpMethod.POST)
	public APIResponse addMember(@Named("email") String email,
			@Named("firstName") String firstName,
			@Named("lastName") String lastName) {
		try {
			// Thulasi to add mail sending code here
			return new APIResponse(Status.SUCCESS, "success");

		} catch (Exception ex) {
			return new APIResponse(ex);
		}
	}
}
